package com.ljh.provider.application;

import com.ljh.myrpc.RpcApplication;
import com.ljh.myrpc.bootstarp.ProviderBootStarp;
import com.ljh.myrpc.config.RegistryConfig;
import com.ljh.myrpc.config.RpcConfig;
import com.ljh.myrpc.model.ServiceMetaInfo;
import com.ljh.myrpc.model.ServiceRegisterInfo;
import com.ljh.myrpc.registry.LocalRegistry;
import com.ljh.myrpc.registry.Registry;
import com.ljh.myrpc.registry.RegistryFactory;
import com.ljh.myrpc.server.HttpServer;
import com.ljh.myrpc.server.VertxHttpServer;
import com.ljh.common.service.UserService;
import com.ljh.myrpc.server.tcp.VertxTcpClient;
import com.ljh.myrpc.server.tcp.VertxTcpServer;
import com.ljh.provider.service.serviceImpl.UserServiceImpl;

import java.util.ArrayList;
import java.util.List;

public class Provider {

    public static void main(String[] args) {

        List<ServiceRegisterInfo<?>> serviceRegisterInfoList = new ArrayList<>();
        ServiceRegisterInfo<?> serviceRegisterInfo = new ServiceRegisterInfo<>(
                UserService.class.getName(), UserServiceImpl.class);
        serviceRegisterInfoList.add(serviceRegisterInfo);

        // 服务提供者初始化
        ProviderBootStarp.init(serviceRegisterInfoList);
    }

}
